﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Somnus.Windows.Forms
{
    public partial class EventedForm : Form
    {
        public event EventHandler InsertNew;
        
        
        public EventedForm()
        {
            InitializeComponent();
        }

        protected override void WndProc(ref Message m)
        {
            switch (m.Msg)
            {
                case 0x219:
                    switch (m.WParam.ToInt32())
                    {
                        case 0x8000:
                            if (InsertNew != null)
                            {
                                InsertNew(this, EventArgs.Empty);
                            }
                            
                            break;

                    }
                    break;
            }
            base.WndProc(ref m);
        }
    }
}
